feat: custom fees - #855
Conversation
5e68855 to
f1d882d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7387849ebc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // CustomFeeRegistry | ||
| // TODO: finalize custom fee parameters and per-type bonuses. | ||
| config.customFeeRegistryConfig.defaultMinFee = 2_500; | ||
| config.customFeeRegistryConfig.feeIncreaseCooldown = 15 days; |
There was a problem hiding this comment.
Populate per-type bonuses before mainnet deployment
When fee-report construction starts using this registry, leaving typeBonuses empty makes every unset operator's effective fee 8,750 BP, although this deployment config assigns the default curve 6,250 BP and other curves either 8,750 or 10,000 BP. This would overpay default-curve operators and underpay 10,000-BP types; populate the corresponding negative and positive bonuses rather than deploying the acknowledged placeholder configuration.
AGENTS.md reference: AGENTS.md:L73-L77
Useful? React with 👍 / 👎.
| deploymentConfig.customFeeRegistry = vm.parseJsonAddress(config, ".CustomFeeRegistry"); | ||
| vm.label(deploymentConfig.customFeeRegistry, "customFeeRegistry"); | ||
|
|
||
| deploymentConfig.customFeeRegistryImpl = vm.parseJsonAddress(config, ".CustomFeeRegistryImpl"); | ||
| vm.label(deploymentConfig.customFeeRegistryImpl, "customFeeRegistryImpl"); |
There was a problem hiding this comment.
Guard custom-registry keys for legacy artifacts
The default curated regression action uses artifacts/mainnet/curated/deploy-mainnet.json, which does not contain either new key, but every curated integration test calls this parser during initializeFromDeployment(). These unconditional parseJsonAddress calls therefore revert in test setup before the current deployed module can be tested; use keyExistsJson as with other optional/future deployment fields so pre-registry artifacts remain supported.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c32881d60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| address strikesCommittee; | ||
| StrikeThreshold[] strikesThresholds; | ||
| // CustomFeeRegistry | ||
| CustomFeeRegistryConfig customFeeRegistryConfig; |
There was a problem hiding this comment.
Preserve legacy CuratedDeployParams decoding
When a regression or fork flow reads the checked-in pre-registry artifacts/mainnet/curated/deploy-mainnet.json, appending this dynamic field changes the ABI tuple layout, while updateCuratedDeployParams and parseCommonDeployParams still decode the old .CuratedDeployParams bytes as the new struct and therefore revert before tests run. Fresh evidence beyond the existing address-key comment is that guarding .CustomFeeRegistry keys would not fix this encoded-struct incompatibility; version the payload or retain a legacy decoding path with defaults.
Useful? React with 👍 / 👎.
Description
Checklist
just coverage)